package com.mmall.service;

import com.github.pagehelper.PageInfo;
import com.mmall.common.ServerResponse;
import com.mmall.vo.OrderProductVo;
import com.mmall.vo.OrderVo;

import java.util.Map;

/**
 * 订单及支付宝管理逻辑层接口
 * Created by qezhhnjy on 2017/10/6-15:20.
 */
public interface IOrderService {
    ServerResponse pay(Integer userId, Long orderNo, String path);

    ServerResponse aliCallback(Map<String, String> params);

    ServerResponse queryOrderPayStatus(Integer userId, Long orderNo);

    //通过用户id查找其完整购物车中勾选的购买商品和传入的收货地址创建订单.
    ServerResponse createOrder(Integer userId, Integer shippingId);

    //取消订单
    ServerResponse<String> cancelOrder(Integer userId, Long orderNo);

    ServerResponse<OrderProductVo> orderSimple(Integer userId);

    //直接获取订单详情
    ServerResponse<OrderVo> getOrderDetail(Integer userId, Long orderNo);

    //查询当前用户的订单列表
    ServerResponse<PageInfo<OrderVo>> list(Integer userId, Integer pageNum, Integer pageSize);

    //后端管理员方法
    ServerResponse<PageInfo<OrderVo>> managerList(Integer pageNum, Integer pageSize);

    ServerResponse<OrderVo> managerDetail(Long orderNo);
}
